<template>
	<u-popup v-model="customerShow" mode="center" @close="close">
		<view class="customer">
			<view class="title">客服电话</view>
			<view class="txt">
				{{mobile}}
			</view>
		</view>
	</u-popup>
</template>

<script>
	export default {
		props: {
			show: {
				type: [String, Boolean],
				default: false
			}
		},
		data() {
			return {
				customerShow:false,
				mobile:''
			}
		},
		watch:{
			show:{
				handler(newval,oldVal){
					this.customerShow = this.show;
				},
				immediate: true
			}
		},
		mounted() {
			this.getinfo();
		},
		methods:{
			close() {
				this.$emit('close')
			},
			getinfo(){
				this.$http.asyncSendrequest({
					url: '/common/customer',
					success: res => {
						this.mobile = res.data;
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.customer{
		padding: 30rpx;
		width: 60vw;
		background: #fff;
		border-radius: 10rpx;
		.title{
			font-size: 36rpx;
			text-align: center;
		}
		.txt{
			text-align: center;
			font-size: 40rpx;
			margin-top: 30rpx;
			font-weight: bold;
		}
	}
</style>